﻿using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Threading;
using System.Reflection;

namespace Ecosystème
{
    public partial class ParametrePartie : Form
    {
        String cheminXML = Path.GetDirectoryName(Assembly.GetAssembly(typeof(ParametrePartie)).CodeBase) +"/listeEtreVivant.xml";

        

        public ParametrePartie()
        {
            InitializeComponent();
            Arborescence arbre = new Arborescence(cheminXML, TVAnimauxPresents);      
        }


        private void btnStart_Click(object sender, EventArgs e)
        {
            this.Hide();
            Thread theThread = new Thread(creerTheadGame);
            theThread.Start();
        }

        public void creerTheadGame()
        {
            frmPlateau plateau = new frmPlateau();
            plateau.Show();
            Game1 game = new Game1(plateau.getDrawSurface());
            game.Run(); 
        }

        private void btnRetour_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnAjoutEspece_Click(object sender, EventArgs e)
        {
            AjoutEspece f = new AjoutEspece();
            f.ShowDialog();
        }

    }
}
